<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OpenLoong Dynamics Control: PVT_Ctr Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">OpenLoong Dynamics Control
   &#160;<span id="projectnumber">v0.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classPVT__Ctr-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">PVT_Ctr Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>This class implemented a position and velocity based low-level PD motor controller.  
 <a href="classPVT__Ctr.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="PVT__ctrl_8h_source.html">PVT_ctrl.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a471dd413e1e95bbe91e218e1ea611a6f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#a471dd413e1e95bbe91e218e1ea611a6f">PVT_Ctr</a> (double timeStepIn, const char *jsonPath)</td></tr>
<tr class="memdesc:a471dd413e1e95bbe91e218e1ea611a6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a new pvt ctr object.  <a href="classPVT__Ctr.html#a471dd413e1e95bbe91e218e1ea611a6f">More...</a><br /></td></tr>
<tr class="separator:a471dd413e1e95bbe91e218e1ea611a6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59c9680162b5ef4bd67553b4eadcd5de"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#a59c9680162b5ef4bd67553b4eadcd5de">calMotorsPVT</a> ()</td></tr>
<tr class="memdesc:a59c9680162b5ef4bd67553b4eadcd5de"><td class="mdescLeft">&#160;</td><td class="mdescRight">calculate the motors torque  <a href="classPVT__Ctr.html#a59c9680162b5ef4bd67553b4eadcd5de">More...</a><br /></td></tr>
<tr class="separator:a59c9680162b5ef4bd67553b4eadcd5de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf75859d36e4319b658748e35c40c2c0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#abf75859d36e4319b658748e35c40c2c0">calMotorsPVT</a> (double deltaP_Lim)</td></tr>
<tr class="memdesc:abf75859d36e4319b658748e35c40c2c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">calculate the motors torque with delta position limit  <a href="classPVT__Ctr.html#abf75859d36e4319b658748e35c40c2c0">More...</a><br /></td></tr>
<tr class="separator:abf75859d36e4319b658748e35c40c2c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29f1c739eec92db4f83ba0a1fdb53367"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#a29f1c739eec92db4f83ba0a1fdb53367">enablePV</a> ()</td></tr>
<tr class="memdesc:a29f1c739eec92db4f83ba0a1fdb53367"><td class="mdescLeft">&#160;</td><td class="mdescRight">enable PV control item for all the joints  <a href="classPVT__Ctr.html#a29f1c739eec92db4f83ba0a1fdb53367">More...</a><br /></td></tr>
<tr class="separator:a29f1c739eec92db4f83ba0a1fdb53367"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae17e60bb77cff1eee387ba7681f552d0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#ae17e60bb77cff1eee387ba7681f552d0">disablePV</a> ()</td></tr>
<tr class="memdesc:ae17e60bb77cff1eee387ba7681f552d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">disable PV control item for all the joints  <a href="classPVT__Ctr.html#ae17e60bb77cff1eee387ba7681f552d0">More...</a><br /></td></tr>
<tr class="separator:ae17e60bb77cff1eee387ba7681f552d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae18b2ffdd1d2198450698dc89af3425d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#ae18b2ffdd1d2198450698dc89af3425d">enablePV</a> (int jtId)</td></tr>
<tr class="memdesc:ae18b2ffdd1d2198450698dc89af3425d"><td class="mdescLeft">&#160;</td><td class="mdescRight">enable PV control item for specific joint  <a href="classPVT__Ctr.html#ae18b2ffdd1d2198450698dc89af3425d">More...</a><br /></td></tr>
<tr class="separator:ae18b2ffdd1d2198450698dc89af3425d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31ece05e6fe09c2ac4df3265e84a6d75"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#a31ece05e6fe09c2ac4df3265e84a6d75">disablePV</a> (int jtId)</td></tr>
<tr class="memdesc:a31ece05e6fe09c2ac4df3265e84a6d75"><td class="mdescLeft">&#160;</td><td class="mdescRight">disable PV control item for specific joint  <a href="classPVT__Ctr.html#a31ece05e6fe09c2ac4df3265e84a6d75">More...</a><br /></td></tr>
<tr class="separator:a31ece05e6fe09c2ac4df3265e84a6d75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9043bcd372772fda34a4a3d8b6ff96ee"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#a9043bcd372772fda34a4a3d8b6ff96ee">setJointPD</a> (double kp, double kd, const char *jointName)</td></tr>
<tr class="memdesc:a9043bcd372772fda34a4a3d8b6ff96ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the Joint P D gain.  <a href="classPVT__Ctr.html#a9043bcd372772fda34a4a3d8b6ff96ee">More...</a><br /></td></tr>
<tr class="separator:a9043bcd372772fda34a4a3d8b6ff96ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a596b859183cef9466234053260d05185"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#a596b859183cef9466234053260d05185">dataBusRead</a> (<a class="el" href="structDataBus.html">DataBus</a> &amp;busIn)</td></tr>
<tr class="memdesc:a596b859183cef9466234053260d05185"><td class="mdescLeft">&#160;</td><td class="mdescRight">read necessary data from databus  <a href="classPVT__Ctr.html#a596b859183cef9466234053260d05185">More...</a><br /></td></tr>
<tr class="separator:a596b859183cef9466234053260d05185"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50946a0747c3b2c5a44693e0efa07b83"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#a50946a0747c3b2c5a44693e0efa07b83">dataBusWrite</a> (<a class="el" href="structDataBus.html">DataBus</a> &amp;busIn)</td></tr>
<tr class="memdesc:a50946a0747c3b2c5a44693e0efa07b83"><td class="mdescLeft">&#160;</td><td class="mdescRight">write the updated data to databus  <a href="classPVT__Ctr.html#a50946a0747c3b2c5a44693e0efa07b83">More...</a><br /></td></tr>
<tr class="separator:a50946a0747c3b2c5a44693e0efa07b83"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a65bea7c1cf6efd9779fafb9530542b5a"><td class="memItemLeft" align="right" valign="top"><a id="a65bea7c1cf6efd9779fafb9530542b5a"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#a65bea7c1cf6efd9779fafb9530542b5a">jointNum</a></td></tr>
<tr class="memdesc:a65bea7c1cf6efd9779fafb9530542b5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">number of joints <br /></td></tr>
<tr class="separator:a65bea7c1cf6efd9779fafb9530542b5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7ffa78b4deff2ded61d871605d04820"><td class="memItemLeft" align="right" valign="top"><a id="aa7ffa78b4deff2ded61d871605d04820"></a>
std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#aa7ffa78b4deff2ded61d871605d04820">motor_pos_cur</a></td></tr>
<tr class="memdesc:aa7ffa78b4deff2ded61d871605d04820"><td class="mdescLeft">&#160;</td><td class="mdescRight">all current motors position <br /></td></tr>
<tr class="separator:aa7ffa78b4deff2ded61d871605d04820"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92dc261978c8606d77f190ea395023a5"><td class="memItemLeft" align="right" valign="top"><a id="a92dc261978c8606d77f190ea395023a5"></a>
std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#a92dc261978c8606d77f190ea395023a5">motor_pos_des_old</a></td></tr>
<tr class="memdesc:a92dc261978c8606d77f190ea395023a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">last all desired motors position <br /></td></tr>
<tr class="separator:a92dc261978c8606d77f190ea395023a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d77dccb170f7a4b1ecf173b91047ba4"><td class="memItemLeft" align="right" valign="top"><a id="a9d77dccb170f7a4b1ecf173b91047ba4"></a>
std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#a9d77dccb170f7a4b1ecf173b91047ba4">motor_vel</a></td></tr>
<tr class="memdesc:a9d77dccb170f7a4b1ecf173b91047ba4"><td class="mdescLeft">&#160;</td><td class="mdescRight">all current motors velocity <br /></td></tr>
<tr class="separator:a9d77dccb170f7a4b1ecf173b91047ba4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af96ebbc7d163601d831ca6fbdec2f8a1"><td class="memItemLeft" align="right" valign="top"><a id="af96ebbc7d163601d831ca6fbdec2f8a1"></a>
std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#af96ebbc7d163601d831ca6fbdec2f8a1">motor_tor_out</a></td></tr>
<tr class="memdesc:af96ebbc7d163601d831ca6fbdec2f8a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">final tau output, the real desired torque exerted by the motor <br /></td></tr>
<tr class="separator:af96ebbc7d163601d831ca6fbdec2f8a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86bed2b218438e82e07858019af6eb12"><td class="memItemLeft" align="right" valign="top"><a id="a86bed2b218438e82e07858019af6eb12"></a>
std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#a86bed2b218438e82e07858019af6eb12">motor_pos_des</a></td></tr>
<tr class="memdesc:a86bed2b218438e82e07858019af6eb12"><td class="mdescLeft">&#160;</td><td class="mdescRight">all desired motors position <br /></td></tr>
<tr class="separator:a86bed2b218438e82e07858019af6eb12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5624aa8616b716c07dbd15ccb97f81df"><td class="memItemLeft" align="right" valign="top"><a id="a5624aa8616b716c07dbd15ccb97f81df"></a>
std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#a5624aa8616b716c07dbd15ccb97f81df">motor_vel_des</a></td></tr>
<tr class="memdesc:a5624aa8616b716c07dbd15ccb97f81df"><td class="mdescLeft">&#160;</td><td class="mdescRight">all desired motors velocity <br /></td></tr>
<tr class="separator:a5624aa8616b716c07dbd15ccb97f81df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbd741b868f4b6c28b8968bee46ca65c"><td class="memItemLeft" align="right" valign="top"><a id="acbd741b868f4b6c28b8968bee46ca65c"></a>
std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#acbd741b868f4b6c28b8968bee46ca65c">motor_tor_des</a></td></tr>
<tr class="memdesc:acbd741b868f4b6c28b8968bee46ca65c"><td class="mdescLeft">&#160;</td><td class="mdescRight">all desired motors torque <br /></td></tr>
<tr class="separator:acbd741b868f4b6c28b8968bee46ca65c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a087f2c0d307a08d0ca7a535e8d72e2df"><td class="memItemLeft" align="right" valign="top"><a id="a087f2c0d307a08d0ca7a535e8d72e2df"></a>
std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#a087f2c0d307a08d0ca7a535e8d72e2df">pvt_Kp</a></td></tr>
<tr class="memdesc:a087f2c0d307a08d0ca7a535e8d72e2df"><td class="mdescLeft">&#160;</td><td class="mdescRight">kp gains of the motors <br /></td></tr>
<tr class="separator:a087f2c0d307a08d0ca7a535e8d72e2df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94d3bed472c408dcf2f5f63d63f04ba3"><td class="memItemLeft" align="right" valign="top"><a id="a94d3bed472c408dcf2f5f63d63f04ba3"></a>
std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#a94d3bed472c408dcf2f5f63d63f04ba3">pvt_Kd</a></td></tr>
<tr class="memdesc:a94d3bed472c408dcf2f5f63d63f04ba3"><td class="mdescLeft">&#160;</td><td class="mdescRight">kd gains of the motors <br /></td></tr>
<tr class="separator:a94d3bed472c408dcf2f5f63d63f04ba3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4041b56d20aeec8f7f4a07694530272"><td class="memItemLeft" align="right" valign="top"><a id="aa4041b56d20aeec8f7f4a07694530272"></a>
std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#aa4041b56d20aeec8f7f4a07694530272">maxTor</a></td></tr>
<tr class="memdesc:aa4041b56d20aeec8f7f4a07694530272"><td class="mdescLeft">&#160;</td><td class="mdescRight">max torque limit of the motors <br /></td></tr>
<tr class="separator:aa4041b56d20aeec8f7f4a07694530272"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb0b7dccfc83f7595d2f382b11b32b18"><td class="memItemLeft" align="right" valign="top"><a id="afb0b7dccfc83f7595d2f382b11b32b18"></a>
std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#afb0b7dccfc83f7595d2f382b11b32b18">maxVel</a></td></tr>
<tr class="memdesc:afb0b7dccfc83f7595d2f382b11b32b18"><td class="mdescLeft">&#160;</td><td class="mdescRight">max velocity limit of the motors <br /></td></tr>
<tr class="separator:afb0b7dccfc83f7595d2f382b11b32b18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acab0c63a484d70566ce74898da9a1fb8"><td class="memItemLeft" align="right" valign="top"><a id="acab0c63a484d70566ce74898da9a1fb8"></a>
std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#acab0c63a484d70566ce74898da9a1fb8">maxPos</a></td></tr>
<tr class="memdesc:acab0c63a484d70566ce74898da9a1fb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">max position limit of the motors <br /></td></tr>
<tr class="separator:acab0c63a484d70566ce74898da9a1fb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada55b04b5f69ea0e0a69d9fdb45fe853"><td class="memItemLeft" align="right" valign="top"><a id="ada55b04b5f69ea0e0a69d9fdb45fe853"></a>
std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPVT__Ctr.html#ada55b04b5f69ea0e0a69d9fdb45fe853">minPos</a></td></tr>
<tr class="memdesc:ada55b04b5f69ea0e0a69d9fdb45fe853"><td class="mdescLeft">&#160;</td><td class="mdescRight">min position limit of the motors <br /></td></tr>
<tr class="separator:ada55b04b5f69ea0e0a69d9fdb45fe853"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This class implemented a position and velocity based low-level PD motor controller. </p>

<p class="definition">Definition at line <a class="el" href="PVT__ctrl_8h_source.html#l00022">22</a> of file <a class="el" href="PVT__ctrl_8h_source.html">PVT_ctrl.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a471dd413e1e95bbe91e218e1ea611a6f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a471dd413e1e95bbe91e218e1ea611a6f">&#9670;&nbsp;</a></span>PVT_Ctr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PVT_Ctr::PVT_Ctr </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>timeStepIn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>jsonPath</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Construct a new pvt ctr object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">timeStepIn</td><td>control timestep </td></tr>
    <tr><td class="paramname">jsonPath</td><td>the json file path storing the config of motors </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="PVT__ctrl_8cpp_source.html#l00011">11</a> of file <a class="el" href="PVT__ctrl_8cpp_source.html">PVT_ctrl.cpp</a>.</p>

<p class="reference">References <a class="el" href="PVT__ctrl_8h_source.html#l00025">jointNum</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00101">maxPos</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00099">maxTor</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00100">maxVel</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00102">minPos</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00026">motor_pos_cur</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00027">motor_pos_des_old</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00029">motor_tor_out</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00028">motor_vel</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00098">pvt_Kd</a>, and <a class="el" href="PVT__ctrl_8h_source.html#l00097">pvt_Kp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a59c9680162b5ef4bd67553b4eadcd5de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59c9680162b5ef4bd67553b4eadcd5de">&#9670;&nbsp;</a></span>calMotorsPVT() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PVT_Ctr::calMotorsPVT </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>calculate the motors torque </p>

<p class="definition">Definition at line <a class="el" href="PVT__ctrl_8cpp_source.html#l00076">76</a> of file <a class="el" href="PVT__ctrl_8cpp_source.html">PVT_ctrl.cpp</a>.</p>

<p class="reference">References <a class="el" href="PVT__ctrl_8h_source.html#l00025">jointNum</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00099">maxTor</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00026">motor_pos_cur</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00093">motor_pos_des</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00027">motor_pos_des_old</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00095">motor_tor_des</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00029">motor_tor_out</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00028">motor_vel</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00094">motor_vel_des</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00098">pvt_Kd</a>, and <a class="el" href="PVT__ctrl_8h_source.html#l00097">pvt_Kp</a>.</p>

</div>
</div>
<a id="abf75859d36e4319b658748e35c40c2c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf75859d36e4319b658748e35c40c2c0">&#9670;&nbsp;</a></span>calMotorsPVT() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PVT_Ctr::calMotorsPVT </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>deltaP_Lim</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>calculate the motors torque with delta position limit </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">deltaP_Lim</td><td>the largest position increment for the motor </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="PVT__ctrl_8cpp_source.html#l00090">90</a> of file <a class="el" href="PVT__ctrl_8cpp_source.html">PVT_ctrl.cpp</a>.</p>

<p class="reference">References <a class="el" href="PVT__ctrl_8h_source.html#l00025">jointNum</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00099">maxTor</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00026">motor_pos_cur</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00093">motor_pos_des</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00027">motor_pos_des_old</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00095">motor_tor_des</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00029">motor_tor_out</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00028">motor_vel</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00094">motor_vel_des</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00098">pvt_Kd</a>, and <a class="el" href="PVT__ctrl_8h_source.html#l00097">pvt_Kp</a>.</p>

</div>
</div>
<a id="a596b859183cef9466234053260d05185"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a596b859183cef9466234053260d05185">&#9670;&nbsp;</a></span>dataBusRead()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PVT_Ctr::dataBusRead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDataBus.html">DataBus</a> &amp;&#160;</td>
          <td class="paramname"><em>busIn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>read necessary data from databus </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">busIn</td><td>databus object storing the data </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="PVT__ctrl_8cpp_source.html#l00046">46</a> of file <a class="el" href="PVT__ctrl_8cpp_source.html">PVT_ctrl.cpp</a>.</p>

<p class="reference">References <a class="el" href="PVT__ctrl_8h_source.html#l00025">jointNum</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00026">motor_pos_cur</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00093">motor_pos_des</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00095">motor_tor_des</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00028">motor_vel</a>, <a class="el" href="PVT__ctrl_8h_source.html#l00094">motor_vel_des</a>, <a class="el" href="data__bus_8h_source.html#l00037">DataBus::motors_pos_cur</a>, <a class="el" href="data__bus_8h_source.html#l00044">DataBus::motors_pos_des</a>, <a class="el" href="data__bus_8h_source.html#l00046">DataBus::motors_tor_des</a>, <a class="el" href="data__bus_8h_source.html#l00038">DataBus::motors_vel_cur</a>, and <a class="el" href="data__bus_8h_source.html#l00045">DataBus::motors_vel_des</a>.</p>

</div>
</div>
<a id="a50946a0747c3b2c5a44693e0efa07b83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a50946a0747c3b2c5a44693e0efa07b83">&#9670;&nbsp;</a></span>dataBusWrite()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PVT_Ctr::dataBusWrite </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDataBus.html">DataBus</a> &amp;&#160;</td>
          <td class="paramname"><em>busIn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>write the updated data to databus </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">busIn</td><td>databus object storing the data </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="PVT__ctrl_8cpp_source.html#l00057">57</a> of file <a class="el" href="PVT__ctrl_8cpp_source.html">PVT_ctrl.cpp</a>.</p>

<p class="reference">References <a class="el" href="PVT__ctrl_8h_source.html#l00029">motor_tor_out</a>, <a class="el" href="data__bus_8h_source.html#l00039">DataBus::motors_tor_cur</a>, and <a class="el" href="data__bus_8h_source.html#l00047">DataBus::motors_tor_out</a>.</p>

</div>
</div>
<a id="ae17e60bb77cff1eee387ba7681f552d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae17e60bb77cff1eee387ba7681f552d0">&#9670;&nbsp;</a></span>disablePV() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PVT_Ctr::disablePV </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>disable PV control item for all the joints </p>

<p class="definition">Definition at line <a class="el" href="PVT__ctrl_8cpp_source.html#l00124">124</a> of file <a class="el" href="PVT__ctrl_8cpp_source.html">PVT_ctrl.cpp</a>.</p>

<p class="reference">References <a class="el" href="PVT__ctrl_8h_source.html#l00025">jointNum</a>.</p>

</div>
</div>
<a id="a31ece05e6fe09c2ac4df3265e84a6d75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31ece05e6fe09c2ac4df3265e84a6d75">&#9670;&nbsp;</a></span>disablePV() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PVT_Ctr::disablePV </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>jtId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>disable PV control item for specific joint </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">jtId</td><td>joint PV control to be disabled </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="PVT__ctrl_8cpp_source.html#l00128">128</a> of file <a class="el" href="PVT__ctrl_8cpp_source.html">PVT_ctrl.cpp</a>.</p>

</div>
</div>
<a id="a29f1c739eec92db4f83ba0a1fdb53367"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29f1c739eec92db4f83ba0a1fdb53367">&#9670;&nbsp;</a></span>enablePV() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PVT_Ctr::enablePV </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>enable PV control item for all the joints </p>

<p class="definition">Definition at line <a class="el" href="PVT__ctrl_8cpp_source.html#l00115">115</a> of file <a class="el" href="PVT__ctrl_8cpp_source.html">PVT_ctrl.cpp</a>.</p>

<p class="reference">References <a class="el" href="PVT__ctrl_8h_source.html#l00025">jointNum</a>.</p>

</div>
</div>
<a id="ae18b2ffdd1d2198450698dc89af3425d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae18b2ffdd1d2198450698dc89af3425d">&#9670;&nbsp;</a></span>enablePV() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PVT_Ctr::enablePV </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>jtId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>enable PV control item for specific joint </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">jtId</td><td>joint PV control to be enabled </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="PVT__ctrl_8cpp_source.html#l00119">119</a> of file <a class="el" href="PVT__ctrl_8cpp_source.html">PVT_ctrl.cpp</a>.</p>

</div>
</div>
<a id="a9043bcd372772fda34a4a3d8b6ff96ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9043bcd372772fda34a4a3d8b6ff96ee">&#9670;&nbsp;</a></span>setJointPD()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PVT_Ctr::setJointPD </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>kp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>kd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>jointName</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the Joint P D gain. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">kp</td><td>position gain </td></tr>
    <tr><td class="paramname">kd</td><td>velocity gain </td></tr>
    <tr><td class="paramname">jointName</td><td>the name of the joint </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd>motorName </dd></dl>

<p class="definition">Definition at line <a class="el" href="PVT__ctrl_8cpp_source.html#l00062">62</a> of file <a class="el" href="PVT__ctrl_8cpp_source.html">PVT_ctrl.cpp</a>.</p>

<p class="reference">References <a class="el" href="PVT__ctrl_8h_source.html#l00098">pvt_Kd</a>, and <a class="el" href="PVT__ctrl_8h_source.html#l00097">pvt_Kp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="PVT__ctrl_8h_source.html">PVT_ctrl.h</a></li>
<li><a class="el" href="PVT__ctrl_8cpp_source.html">PVT_ctrl.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
